package com.keensense.vcm.model;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.List;

/**
 * @author lanjian
 * @date 2020/8/1
 */
@XmlRootElement(name = "response")
public class SubscriptionResponse extends BaseResponse{

    private List<String> tcpAlarmUrlList;


    private List<String> httpAlarmUrlList;


    private List<FailSub> failSubs;

    @XmlElementWrapper(name = "tcp-alarm-url-list")
    @XmlElement(name = "tcp-alarm-url")
    public List<String> getTcpAlarmUrlList() {
        return tcpAlarmUrlList;
    }

    public void setTcpAlarmUrlList(List<String> tcpAlarmUrlList) {
        this.tcpAlarmUrlList = tcpAlarmUrlList;
    }

    @XmlElementWrapper(name = "http-alarm-url-list")
    @XmlElement(name = "http-alarm-url")
    public List<String> getHttpAlarmUrlList() {
        return httpAlarmUrlList;
    }

    public void setHttpAlarmUrlList(List<String> httpAlarmUrlList) {
        this.httpAlarmUrlList = httpAlarmUrlList;
    }

    @XmlElementWrapper(name = "failSubs")
    @XmlElement(name = "failSub")
    public List<FailSub> getFailSubs() {
        return failSubs;
    }

    public void setFailSubs(List<FailSub> failSubs) {
        this.failSubs = failSubs;
    }

    public static class FailSub {

        private String code;

        private String taskId;

        private String suspectId;

        @XmlElement
        public String getCode() {
            return code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        @XmlElement
        public String getTaskId() {
            return taskId;
        }

        public void setTaskId(String taskId) {
            this.taskId = taskId;
        }

        @XmlElement
        public String getSuspectId() {
            return suspectId;
        }

        public void setSuspectId(String suspectId) {
            this.suspectId = suspectId;
        }
    }

}
